package com.example.autumn.controller;

import com.example.autumn.service.impl.TestServiceImpl;
import com.example.common.Entity.User;
import com.example.common.response.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author Liaorun
 */
@RestController
@RequestMapping("/test")
public class TestController {

    @Autowired
    TestServiceImpl testService;

    @GetMapping("/user")
    public R<User> getUserFromUserCenter(@RequestParam Long id) {
        return testService.getUserFromUserCenter(id);
    }
}
